//
// Created by Lantz on 2024/2/27.
//
#include <stdio.h>
#define MaxSize 50

typedef int Elem;

typedef struct {
    Elem * data;
    int length;
}SqList;

void ListDelete(SqList &L, Elem x){
    int n = L.length;
    int k = 0, i;
    for (int i = 0; i < n; ++i) {
        if(L.data[i] == x){
            k++;
        }else{
            L.data[i - k] = L.data[i];
        }
    }
    L.length = L.length-k;
}

void Print(SqList L){
    int i;
    for (i = 0; i < L.length; i++){
        printf("%d", L.data[i]);
    }
    printf("\n");
}

int main(void){
    SqList  L;
    L.data[0] = 1;
    L.data[1] = 2;
    L.data[2] = 3;
    L.data[3] = 3;
    L.data[4] = 3;
    L.length = 5;
    Print(L);
//    ListDelete(L, 3);
//    PrintList(L);
    return 0;
}